
package jz.dataCenter;

import java.io.IOException;

import jg.exJson.collection.RetCollectionJson;
import SoftFan.metaUnits.translateException;
import SoftFan.workflow.protocol.SoftFanUtilException;
import SoftFan.workflow.protocol.db.wf_Db_Exception;
import SoftfanWeb.metaInfo.metaInfoException;

import com.alibaba.fastjson.JSON;

public class ProcessRetCollection {

	public void exec(String jsondata) throws translateException, SoftFanUtilException, IOException, wf_Db_Exception, metaInfoException {
		RetCollectionJson info = null;
		try {
			info = JSON.parseObject(jsondata, RetCollectionJson.class);

			jz.dbUnit.collectionData.collectionData row = jz.dbUnit.collectionData.collectionDataJDBCUnit.getInstance().loadByPrimaryKey(info.getId());
			try {
				if (row != null) {
					row.setRegid(info.getGid());
					jz.dbUnit.collectionData.collectionDataJDBCUnit.getInstance().UpdateField(row, "regid;", true);
				}
			} finally {
				row.freeData();
			}
		} finally {
			if (info != null) {
				info.free();
			}
		}
	}
}
